package com.haiwei.poi.word.manager;

/**
 * @author Teager
 * @date 2021/5/18
 */
public class LoopDirective {

    //循环层级标识  ##=、###=、 ####= 等
    private String loopFlg;
    private String order;
    private String search;
    private String extend;
    private Integer listSize;
    //明细对象名称，兼容之前逻辑
    private String objectName;
    private Long parentObjectId;

    //明细对象ApiKey
    private String objectApiKey;    //关联实体ApiKey
    private String referItemApiKey;   //关联Item ApiKey

    //循环指令开始位置
    private int begin;
    //循环指令结束位置
    private int end;

    public String getLoopFlg() {
        return loopFlg;
    }

    public void setLoopFlg(String loopFlg) {
        this.loopFlg = loopFlg;
    }

    public boolean isTopLoop(){
        if(loopFlg !=null && loopFlg.equals("##=")){
            return true;
        }else{
            return false;
        }
    }
    public String getOrder() {
        return order;
    }

    public String getSearch() {
        return search;
    }

    public String getExtend() {
        return extend;
    }

    public Integer getListSize() {
        return listSize;
    }

    public void setOrder(String order) {
        this.order = order;
    }

    public void setSearch(String search) {
        this.search = search;
    }

    public void setExtend(String extend) {
        this.extend = extend;
    }

    public String getObjectName() {
        return objectName;
    }

    public void setObjectName(String objectName) {
        this.objectName = objectName;
    }

    public void setListSize(Integer listSize) {
        this.listSize = listSize;
    }

    public int begin() {
        return begin;
    }

    public void setBegin(int begin) {
        this.begin = begin;
    }

    public int end() {
        return end;
    }

    public void setEnd(int end) {
        this.end = end;
    }

    public String getObjectApiKey() {
        return objectApiKey;
    }

    public String getChildObjectKey(){
        return this.objectApiKey + this.referItemApiKey;
    }
    public void setObjectApiKey(String objectApiKey) {
        this.objectApiKey = objectApiKey;
    }

    public String getReferItemApiKey() {
        return referItemApiKey;
    }

    public void setReferItemApiKey(String referItemApiKey) {
        this.referItemApiKey = referItemApiKey;
    }

    public Long getParentObjectId() {
        return parentObjectId;
    }

    public void setParentObjectId(Long parentObjectId) {
        this.parentObjectId = parentObjectId;
    }
}
